// ${doNotModifyComment}
/* eslint-disable */
const StyleLintPlugin = require('stylelint-webpack-plugin')

module.exports = {
  publicPath: '${graphAnalysisPrefix}',
  lintOnSave: process.env.NODE_ENV === 'production' ? false : 'default',
  productionSourceMap: false,
  configureWebpack: (config) => {
    const plugins = [
      new StyleLintPlugin({
        files: ['src/**/*.{vue,less}'],
        fix: true,
      }),
    ]
    return { plugins }
  },
  css: {
    loaderOptions: {
      less: {
        lessOptions: {
          modifyVars: {
            'primary-color': '#5561ff',
            'link-color': '#5561ff',
            'border-radius-base': '2px',
          },
          javascriptEnabled: true,
        },
      },
    },
  },
  devServer: {
    proxy: {
      '/api': {
        // target: 'https://10.5.24.17:8443', // dev
        target: 'https://10.11.32.50:8444', //qcy
        ws: true,
        changeOrigin: true,
        pathRewrite: {
          '^/api/(.*)': '/\$1',
        },
      },
    },
  },
}
